/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sirtet;

/**
 * An interface with which the provider can be notified about when the game
 * board needs a new piece to be added.
 * @author guangwei.zhu
 */
public abstract class PieceProvider {

    /**
     * Triggered when the board askes the provider to add a new next piece.
     */
    public abstract Piece requestPiece();

    /**
     * Return the number of remaining pieces this provider can generate.
     * If the provider can generate infinite number of pieces, the return
     * value is Integer.MAX_VALUE.
     */
    public abstract int remaining();

}
